<section>
	<div class="page-header">
		<h2><?php echo $title; ?></h2>
	</div>
	
	<?php if ($labels) : ?>
	<table class="zebra-striped">
		<thead>
			<tr>
				<th width="30">ID</th>
				<th>Name</th>
				<th>Category</th>
				<th>Website</th>
				<th width="75">Actions</th>
			</tr>
		</thead>
		<tbody>
		<?php foreach ($labels as $label) : ?>
			<tr>
				<td><?php echo $label['site_prod_label_id']; ?></td>
				<td><?php echo $label['name']; ?></td>
				<td><?php echo $label['category_name']; ?></td>
				<td><?php echo $label['site_name']; ?></td>
				<td><?php echo anchor('contents/edit_product_label/' . $label['site_prod_label_id'], 'Edit'); ?> &nbsp; <?php echo anchor('contents/delete_product_label/' . $label['site_prod_label_id'], 'Delete', array('class' => 'delete')); ?></td>
			</tr>
		<?php endforeach; ?>
		</tbody>
	</table>
	<?php echo $this->pagination->create_links(); ?>
	<?php else : ?>
	<p>No records found.</p>
	<?php endif; ?>
</section>

<script>
	$('table .delete').click(function() {
        
        del = $(this);
        
        buildModal({
            modalID: 'deleteContent',
            modalHeader: 'Delete Website Product Label',
            modalBody: 'Are you sure that you want to delete this label?',
            btnPrimaryText: 'Delete',
			ajaxUrl: del.attr('href')
        });
        
        return false;
    });
</script>